package com.ns002.yigou.quote.common.api;

import com.ns002.yigou.quote.json.ParitiesQuote;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

import java.util.List;
import java.util.Map;

/**
 * Created by xu on 2017/6/19 0019.
 * ebuy行情服务器
 */
public interface EBuyQuoteAPI {

    /**
     * 报价服务器登录
     * client_id
     * client_secret
     * grant_type
     * username
     * password
     *
     * @param params
     * @return {
     * "access_token":"e5e5811b-70f2-4b42-bc77-0fe68e359a34",
     * "token_type":"bearer",
     * "refresh_token":"d1420265-33c4-4c05-b64d-dbbee0fdd103",
     * "expires_in":3599,
     * "scope":"read write trust"
     * }
     */
    @POST("/gain-price-server/oauth/token")
    Call<Map<String, String>> gainPriceServerToken(@QueryMap(encoded = true) Map<String, Object> params);

    /**
     * 产品最新报价
     * access_token    报价token
     *
     * @param params
     * @return
     */
    @GET("/gain-price-server/price/tradeShop/sdk/quote")
    Call<List<ParitiesQuote>> gainPriceQuote(@QueryMap(encoded = true) Map<String, Object> params);


}
